home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
visds
/
propties.dsc
< prev
next >
Wrap
Text File
|
1999-05-02
|
2KB
|
97 lines
title Property Pages
gosub getdata
OPTION SCALE,96
DIALOG CREATE,Properties,-1,0,354,232
DIALOG ADD,TAB,TAB1,4,6,340,186,Tab 1|Tab 2|Tab 3
DIALOG ADD,BUTTON,OK,200,120,72,24,OK
DIALOG ADD,BUTTON,Cancel,200,192,72,24,Cancel
DIALOG ADD,BUTTON,Apply,200,274,72,24,Apply
DIALOG ADD,GROUP,GROUP1,31,15,320,148
DIALOG SHOW
if @not(%1)
REM allow initial tab to be specified on command-line
%1 = Tab 1
gosub %1OPEN
end
:evloop
wait event
%E = @event()
goto %E
:Tab 1CLICK
:Tab 2CLICK
:Tab 3CLICK
%2 = @substr(%E,1,-5)
gosub %1CLOSE
shift
gosub %1OPEN
goto evloop
:ApplyBUTTON
gosub savedata
goto evloop
:OKBUTTON
gosub savedata
:CancelBUTTON
:CLOSE
exit
:Tab 1OPEN
DIALOG SET,GROUP1," Properties page 1 "
DIALOG ADD,TEXT,TEXT2,54,24,,,Name:
DIALOG ADD,EDIT,EDIT1,52,68,240,19,%%name
DIALOG ADD,TEXT,TEXT3,80,24,,,Address:
DIALOG ADD,EDIT,EDIT2,78,68,240,90,%%address,MULTI,TABS
exit
:Tab 2OPEN
DIALOG SET,GROUP1," Properties page 2 "
DIALOG ADD,CHECK,CHECK1,52,68,180,18,Use Email?,%%use
DIALOG ADD,TEXT,TEXT2,80,24,,,Email:
DIALOG ADD,EDIT,EDIT1,78,68,240,19,%%email
exit
:Tab 3OPEN
DIALOG SET,GROUP1," Properties page 3 "
DIALOG ADD,CHECK,CHECK1,48,48,180,18,Other Stuff 1,%%other1
DIALOG ADD,CHECK,CHECK2,72,48,180,18,Other Stuff 2,%%other2
DIALOG ADD,CHECK,CHECK3,96,48,180,18,Other Stuff 3,%%other3
DIALOG ADD,CHECK,CHECK4,120,48,180,18,Other Stuff 4,%%other4
exit
:Tab 1CLOSE
%%name = @dlgtext(EDIT1)
%%address = @dlgtext(EDIT2)
DIALOG REMOVE,TEXT2
DIALOG REMOVE,EDIT1
DIALOG REMOVE,TEXT3
DIALOG REMOVE,EDIT2
exit
:Tab 2CLOSE
%%use = @dlgtext(CHECK1)
%%email = @dlgtext(EDIT1)
DIALOG REMOVE,CHECK1
DIALOG REMOVE,TEXT2
DIALOG REMOVE,EDIT1
exit
:Tab 3CLOSE
%%other1 = @dlgtext(CHECK1)
%%other2 = @dlgtext(CHECK2)
%%other3 = @dlgtext(CHECK3)
%%other4 = @dlgtext(CHECK4)
DIALOG REMOVE,CHECK1
DIALOG REMOVE,CHECK2
DIALOG REMOVE,CHECK3
DIALOG REMOVE,CHECK4
exit
:getdata
REM in a real example this data would probably be
REM got from the registry
%%name =
%%address =
%%use =
%%email =
exit
:savedata
REM this subroutine does nothing.
REM it is run when OK or Apply are clicked.
REM in a real example it would probably save the data
REM to the Registry.
exit